package com.demo.service;

import com.demo.entity.Flower;
import com.demo.mapper.FlowerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class FlowerServiceImpl implements  FlowerService{

    @Autowired
    private FlowerMapper mapper;
    @Override
    public List<Flower> selectAll() {
        return mapper.selectAll();
    }

    @Override
    public List<Flower> selectByname(String name) {
        return mapper.selectByname(name);
    }

    @Override
    public Flower selectById(int id) {
        return mapper.selectById(id);
    }

    @Override
    public int deleteById(int id) {
        return mapper.deleteById(id);
    }

    @Override
    public int insertFlower(Flower flowers) {
        return mapper.insertFlower(flowers);
    }

    @Override
    public int updateFlower(Flower flowers) {
        return mapper.updateFlower(flowers);
    }
}
